Skip to content

fix(windows-installer): UseSetupLdr=no so Smart App Control can't block it#331

Closed
BitHighlander wants to merge 1 commit into
developfrom
fix/windows-installer-smart-app-control
Closed

fix(windows-installer): UseSetupLdr=no so Smart App Control can't block it#331
BitHighlander wants to merge 1 commit into
developfrom
fix/windows-installer-smart-app-control

Conversation

@BitHighlander

Copy link
Copy Markdown
Collaborator

Summary

Postmortem fix for the 1.4.11 Windows installer, which failed to launch on any machine with Smart App Control (SAC) enabled. Ports the fix already on release/1.4.11 (35c89547).

Root cause

A default single-exe Inno installer self-extracts an unsigned setup.tmp engine to %TEMP% and runs it. SAC (default-on for many Win11 installs) blocks unsigned code → "Setup failed to initialize" (exit 1, CodeIntegrity 3077/3033), nothing installs. The EV signature on the outer setup.exe doesn't help — SAC evaluates the extracted setup.tmp independently and stock Inno can't sign it. The app binaries are all EV-signed and SAC-clean; only the installer's stub was the problem.

Fix

  • installer.iss: UseSetupLdr=no → no setup.tmp; the signed setup.exe is the engine, runs in-process, SAC only sees the signed exe. Inno emits setup.exe + setup-*.bin.
  • build-windows-production.ps1: zips the parts into KeepKey-Vault-<ver>-win-x64-setup.zip and deletes the loose exe/bin so a bare (SAC-blocked) single-exe can't ship by accident.
  • Docs: WINDOWS-BUILD-AND-SIGN.md gains a "Smart App Control" section + a mandatory "install under SAC (Enforce)" checklist item (SAC-off machines are an invalid test — that's how it slipped through: the 1.4.7 smoke test was SAC-off). Full write-up in docs/incidents/1.4.11-smart-app-control-installer-block.md.

Validation

On a SAC-Enforce machine, real download flow (zip + Mark-of-the-Web → extract → run setup.exe): installer exit 0, version → 1.4.11, no 3077/3033, app boots (+869ms: boot complete). v1.4.11 re-shipped as the .zip; broken .exe removed.

Follow-ups (not in this PR)

  • Download page must point at the .zip (extract → run setup.exe), not a .exe.
  • Long-term: a .zip is a UX regression vs a one-click .exe. Evaluate NSIS (in-process, single signed exe, SAC-clean) or MSIX/MSI to restore a single downloadable file.

🤖 Generated with Claude Code

…ck it

The default single-exe Inno installer self-extracts an UNSIGNED setup.tmp engine
to %TEMP% and runs it. Smart App Control (on by default on many Win11 machines)
blocks unsigned code, so v1.4.11 died with "Setup failed to initialize" (exit 1,
CodeIntegrity 3077/3033) and installed nothing. The EV signature on the outer
setup.exe doesn't help — SAC evaluates the extracted setup.tmp on its own, and
stock Inno can't sign it. The app binaries themselves are all EV-signed and
SAC-clean; only the installer's extracted stub was the problem.

Fix:
- installer.iss: UseSetupLdr=no -> no setup.tmp; the signed setup.exe is the
  engine and runs in-process, so SAC only sees the signed exe. Inno now emits
  setup.exe + setup-*.bin.
- build-windows-production.ps1: zip the parts into
  KeepKey-Vault-<ver>-win-x64-setup.zip and delete the loose exe/bin so a bare
  (SAC-blocked) single exe can't be shipped by accident.
- docs: WINDOWS-BUILD-AND-SIGN.md gains a "Smart App Control" section and a
  MANDATORY "install under SAC (Enforce)" checklist item — SAC-off machines are
  an invalid test, which is how this slipped through (1.4.7 smoke test was
  SAC-off). Full write-up in docs/incidents/.

Validated on a SAC-Enforce machine via the real download flow (zip + MotW ->
extract -> run setup.exe): exit 0, version 1.4.11, no 3077/3033, app boots.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@BitHighlander

Copy link
Copy Markdown
Collaborator Author

Superseded — this patch already landed via the release/1.4.11 branch and shipped through #332 (release/1.4.11 -> master) and #333 (master -> develop back-merge), per the normal release-train flow. Closing to avoid landing the same fix twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant